From: Juanma Barranquero Date: Wed, 28 Feb 2007 12:50:43 +0000 (+0000) Subject: (where-is): Fail gracefully when not passed a command. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~1844 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=c7d65151711005424df42d0355d1ecba5b51a23b;p=emacs.git (where-is): Fail gracefully when not passed a command. --- diff --git a/lisp/help.el b/lisp/help.el index 8aa9ba6c46b..d0783dd0351 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -491,6 +491,7 @@ If INSERT (the prefix arg) is non-nil, insert the message in the buffer." "Where is command: ") obarray 'commandp t)) (list (if (equal val "") fn (intern val)) current-prefix-arg))) + (unless definition (error "No command")) (let ((func (indirect-function definition)) (defs nil) (standard-output (if insert (current-buffer) t)))